1 % Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite
3 {\ttfamily \raggedright {
5 \mbox{}\textbf{\textcolor{RoyalBlue
}{import
}}\ java
\textcolor{BrickRed
}{.
}io
\textcolor{BrickRed
}{.*;
} \\
6 \mbox{}\textbf{\textcolor{RoyalBlue
}{import
}}\ java
\textcolor{BrickRed
}{.
}util
\textcolor{BrickRed
}{.*;
} \\
8 \mbox{}\textbf{\textcolor{Blue
}{class
}}\ Main
\textcolor{Red
}{\
{} \\
9 \mbox{}\ \ \ \
\textbf{\textcolor{Blue
}{public
}}\
\textbf{\textcolor{Blue
}{static
}}\
\textcolor{ForestGreen
}{void
}\
\textbf{\textcolor{Black
}{main
}}\textcolor{BrickRed
}{(
}String
\textcolor{BrickRed
}{[]}\ args
\textcolor{BrickRed
}{)
}\textcolor{Red
}{\
{} \\
10 \mbox{}\ \ \ \ \ \ \ \ Scanner\ sc\
\textcolor{BrickRed
}{=
}\
\textbf{\textcolor{Blue
}{new
}}\
\textbf{\textcolor{Black
}{Scanner
}}\textcolor{BrickRed
}{(
}System
\textcolor{BrickRed
}{.
}in
\textcolor{BrickRed
}{);
} \\
11 \mbox{}\ \ \ \ \ \ \ \
\textbf{\textcolor{Blue
}{while
}}\
\textcolor{BrickRed
}{(
}sc
\textcolor{BrickRed
}{.
}\textbf{\textcolor{Black
}{hasNextLine
}}\textcolor{BrickRed
}{())
}\textcolor{Red
}{\
{} \\
12 \mbox{}\ \ \ \ \ \ \ \ \ \ \ \ String\ s
\textcolor{BrickRed
}{=
}\ sc
\textcolor{BrickRed
}{.
}\textbf{\textcolor{Black
}{nextLine
}}\textcolor{BrickRed
}{();
} \\
13 \mbox{}\ \ \ \ \ \ \ \ \ \ \ \ System
\textcolor{BrickRed
}{.
}out
\textcolor{BrickRed
}{.
}\textbf{\textcolor{Black
}{println
}}\textcolor{BrickRed
}{(
}\texttt{\textcolor{Red
}{"
{}LeĆ:\ "
{}}}\
\textcolor{BrickRed
}{+
}\ s
\textcolor{BrickRed
}{);
} \\
14 \mbox{}\ \ \ \ \ \ \ \
\textcolor{Red
}{\
}} \\
15 \mbox{}\ \ \ \
\textcolor{Red
}{\
}} \\
16 \mbox{}\textcolor{Red
}{\
}}
17 } \normalfont\normalsize